package
{
	import mx.containers.Canvas;
	import mx.controls.Alert;

	public class myprogress extends Canvas
	{
		private var c1:Canvas = new Canvas();
		private var c2:Canvas = new Canvas();
		
		public function myprogress()
		{
			super();
			this.percentHeight = 100;
			this.percentWidth = 100;
			this.alpha = 0.8;
			this.setStyle("backgroundColor", "#eefdfc");
			c1.setStyle("borderThickness", 2);
			c1.setStyle("borderStyle", "solid");
			c1.setStyle("borderColor","#333333");
			c1.setStyle("backgroundColor","#ffffff");
			c1.setStyle("horizontalCenter","0");
			c1.width = 200;
			c1.height = 20;
			c1.x = (this.width-200)/2;
			c1.y = 250;
			trace(this.width);
			c2.setStyle("backgroundColor","#6F9FD5");
			c2.width = 201;
			c2.height = 100;
			c2.x = -200;
			
			c1.addChild(c2);
			addChild(c1);
		}
		
		public function goprocess(val:Number):void{
			var data:Number = (200 * val)-200;
			this.c2.x = data;
		}
	}
}